package main.flex.skin
{
	import main.flex.conf.MainConf;
	
	import mx.graphics.RectangularDropShadow;
	import mx.skins.RectangularBorder;

	public class BackgroundBorder extends RectangularBorder
	{
		public function BackgroundBorder()
		{
			super();
		}
		
		//private var dropShadow		: RectangularDropShadow;

        override protected function updateDisplayList ( unscaledWidth : Number, unscaledHeight : Number) : void 
        {
            super.updateDisplayList( unscaledWidth, unscaledHeight );
        	
            var lineColor			: int 		= getStyle("strokeColor");
            var lineAlpha			: Number 	= getStyle("backgroundAlpha");
            
            graphics.clear();
            graphics.lineStyle( 
		            			MainConf.BORDER_GLOBAL_CONTAINER,
		            			lineColor,
		            			lineAlpha,
		            			true
		            			);

            // Background
            graphics.drawRoundRect(
           					MainConf.APPLICATION_X,
               				MainConf.APPLICATION_Y,
               				MainConf.APPLICATION_WIDTH,//unscaledWidth,
               				MainConf.APPLICATION_HEIGHT,//unscaledHeight,
           					MainConf.ELLIPSE_GLOBAL_CONTAINER,
           					MainConf.ELLIPSE_GLOBAL_CONTAINER
           					);
            graphics.endFill();
            
            
            // Shadow
            /* if ( !dropShadow )
                dropShadow = new RectangularDropShadow();
            
            dropShadow.distance = 0;
            dropShadow.angle = 45;
            dropShadow.color = 0;
            dropShadow.alpha = 0.4;
            dropShadow.tlRadius = 0;
            dropShadow.trRadius = cornerRadius;
            dropShadow.blRadius = cornerRadius;
            dropShadow.brRadius = 0;
            
            dropShadow.drawShadow(
            						graphics,
            						0,
            						0,
            						unscaledWidth,
            						unscaledHeight
            						); */
        }		
	}
}